package com.mic.yzzn.plc.common.control.RMI;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

import com.mic.yzzn.plc.common.control.datastructure.PLCMission;
import com.mic.yzzn.plc.common.control.datastructure.PLCMissionResult;
import com.mic.yzzn.plc.common.ins.datastructure.PLCContactorNumber;
import com.mic.yzzn.plc.common.ins.datastructure.PLCDataRegisterNumber;


public interface PLCCollector extends Remote
{
	/**
	 * 添加一个实时写任务 由web app调用
	 * @param mission 任务
	 * @return 任务结果
	 * @throws RemoteException
	 */
	public PLCMissionResult addRealtimeWriteMission(PLCMission mission) throws RemoteException;
	
	

	/**
	 * 添加一个实时读任务 由web app调用
	 * @param mission 任务
	 * @return 任务结果
	 * @throws RemoteException
	 */
	public PLCMissionResult addRealtimeReadMission(PLCMission mission) throws RemoteException;

	/**
	 * 获取所有的周期扫描结果
	 * @return 所有的周期扫描结果
	 * @throws RemoteException
     */
	public PLCMissionResult getCycleMissionResult() throws RemoteException;

	/**
	 * 获取指定触点号的扫描结果
	 * @param numberArray
	 * @return 指定触点号的扫描结果
	 * @throws RemoteException
     */
	public PLCMissionResult getCycleMissionResultFromContactorNumberArray(ArrayList<PLCContactorNumber> numberArray)
			throws RemoteException;

	/**
	 * 获取指定寄存器号的扫描结果
	 * @param numberArray
	 * @return 指定寄存器号的扫描结果
	 * @throws RemoteException
     */
	public PLCMissionResult getCycleMissionResultFromDataRegisterNumberArray(ArrayList<PLCDataRegisterNumber> numberArray)
		throws RemoteException;

	
}
